Skip to content

pkgs/id crate split step 2b-1: extract id-events (#4405) - #8656

Merged
dezren39 merged 1 commit into
mainfrom
crate-split-step2b1-id-events-vocab
Nov 11, 2026
Merged

dezren39 merged 1 commit into
mainfrom
crate-split-step2b1-id-events-vocab

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Step 2b-1 of the pkgs/id crate split (#3447 umbrella, #4405): create crates/id-events (deps: id-core, id-store) and move the group-projection vocabulary down into it, per the coordinator's design ruling on #4405 — the group model and fold are group-projection vocabulary owned by the events layer.

Moved into id-events (implementation only there; facade re-exports preserve every historical path):

  • groups model + projection: model types (Key, Role, Event, Body, DeviceOp, Create, MemberOp, Delegate, DEVICE_*_KIND), groups::policy, groups::fold, groups::delegation, groups::friendship, groups::event, the serde wire adapters (extracted from groups/log.rs), and the groups test suite.
  • idset (whole surface incl. expand/view): its only group references were groups::Role and groups::fold, both here now, so its deps resolve downward.
  • pull_policy (PullPolicy/PullGate/PullRefused) and local_claims: leaf-like sync-gating value types.
  • world_access::WorldAccess: the blob gate's leaf trait, moved down; blob_gate (facade, step 4) re-exports it and keeps FoldedWorlds + gate logic.

Facade consequences:

  • id::groups becomes a shim: re-exports the moved modules/types from id_events::groups, keeps actions, log, warnings, worlds local (the step-4 remainder). groups::log::wire is re-exported from id_events::groups::wire.
  • id::idset, id::local_claims are re-exports; src/pull_policy.rs is a shim holding the re-exports, the facade-side test fixtures (which fold through the facade's groups::worlds), and the one store-backed gate test.
  • In id-events, pull_policy's test fixture folds with this crate's own groups::fold and answers membership from the projection (same membership set; the fixture world has no grants).

Step 2b-2 (event_store, local_events, event_sync, attestation) follows on a stacked branch.

Verification (protocol of steps 1/2a):

  • Baseline on unmodified main @a3cc79eb8a: 66 suites / 3,676 passed / 1 failed / 33 ignored. The one failure is the pre-existing frames::tests::byte_refusal_does_not_spend_a_frame_token_or_increment_counters (pkgs/id: frames byte_refusal test fails deterministically on main (RequestTooLarge vs BudgetExhausted) #8620).
  • This PR: 68 suites / 3,676 passed / 1 failed (same frames test) / 33 ignored — parity; suite delta is the relocated suites (facade lib 2,480 → 2,362, id-events lib gains the moved tests, incl. the store-backed gate test staying in the facade shim).
  • Fuel canary: sha256sum pkgs/id/src/sandbox.rs identical before/after (db88ec8d52e961702353c97a407b77badadef1bd7e0a610a6075267e175d80b5); print_fuel_baseline output byte-identical (72 lines).
  • Nix: nix build ./pkgs/id#id-lib — see PR comment for the check-phase result.
  • Completeness: moved modules have no implementation left in facade src (only pub use shims/re-exports).

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 11:27
@dezren39 dezren39 changed the title pkgs/id crate split step 2b: extract id-events (#4405) pkgs/id crate split step 2b-1: extract id-events (#4405) Nov 11, 2026
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T11:31:13.398668Z f89b565 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

Copy link
Copy Markdown
Member Author

Nix verification for this PR: nix build ./pkgs/id#id-lib (no NIX_CONFIG override) — the check phase fails on exactly the pre-existing failure, at parity with main: frames::tests::byte_refusal_does_not_spend_a_frame_token_or_increment_counters (#8620), facade lib 2,362 passed / 1 failed / 6 ignored in the Nix sandbox. 2,362 is main's 2,480 minus the 118 tests relocated into the new id-events lib suite by this PR; no other failure appears in the check log. Merging on local parity, as steps 1 and 2a did (repo CI is failing wholesale for unrelated infra reasons).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

if !self.strong_removal(grant.group) {

P2 Badge Update the delegation mutation harness for the moved source

Moving this implementation leaves tests/planted/delegation-voiding.patch and the MUTATED_FILES list in tests/planted-bug-check.sh pointing at pkgs/id/src/groups/delegation.rs. Consequently, once the baseline and earlier mutations pass, check_mutation "delegation-voiding" exits with status 2 instead of checking whether the delegation tests catch the mutation. Verified with git apply --cached --check against temporary indexes: the patch applies to the parent commit but fails here because the old path no longer exists (git apply --help describes --check as checking patch applicability). Update both the patch paths and the harness’s restoration list to the new location.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant